using System;
using System.Collections.Generic;
using System.Text;

namespace BuildingStructuralElements.Sections
{
    public class SelectionByName : SelectionDataStrategy
    {


        private String  _sectionName;


        public String  SectionName
        {
            get { return _sectionName; }
            set { _sectionName = value; }
        }
	


        public SelectionByName(String SectionName)
        {
            this._sectionName = SectionName;
        }

        
        public SelectionByName(){}

        override public  CSectionData getCSectionData()
        {

            CSectionData data;
            data = new CSectionData();
            data.m_Data = new double[100];
            data.Name = "NULL";

            try
            {
                CSection_Facade.GetSectionDataStructAndIndex(_sectionName, ref data, ref  _csectionHeader);

            }
            catch (Exception exp) 
            {
                Console.Write(exp.Message);  
                throw (new SectionDllException("_Section Cannot be Loaded . Strategy Executed SelectionByName")); 
            }
            finally
            {
                
               
            }

             return data;

         }
     }
}
